﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SharePointManagementStudio
{
    public partial class MainWindow : Form
    {
      

        public MainWindow()
        {
            InitializeComponent();
        }

        private void ShowNewForm(object sender, EventArgs e)
        {

            Form childForm = new frmSolutionDeployer();                 
                childForm.MdiParent = this;                
                childForm.Show();
             
                     
        }

        private void OpenFile(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();
            openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
            openFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
            if (openFileDialog.ShowDialog(this) == DialogResult.OK)
            {
                string FileName = openFileDialog.FileName;
            }
        }

        private void SaveAsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog = new SaveFileDialog();
            saveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
            saveFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
            if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
            {
                string FileName = saveFileDialog.FileName;
            }
        }

        private void ExitToolsStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        //private void CutToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //}

        //private void CopyToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //}

        //private void PasteToolStripMenuItem_Click(object sender, EventArgs e)
        //{
        //}

       

        private void CascadeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.Cascade);
        }

        private void TileVerticalToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.TileVertical);
        }

        private void TileHorizontalToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.TileHorizontal);
        }

        private void ArrangeIconsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LayoutMdi(MdiLayout.ArrangeIcons);
        }

        private void CloseAllToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form childForm in MdiChildren)
            {
                childForm.Close();
            }
        }

        private void downloadInstalledSolutionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form childForm = new DownloadSolutions();
            childForm.MdiParent = this;
            childForm.Text = "Download installed Solutions";
            childForm.Show();
             
        }

        private void rectractInstalledSolutionsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form childForm = new frmSolutionProperties(); 
            childForm.MdiParent = this;            
            childForm.Show();
        }

        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form childForm = new AboutBoxme(); 
            childForm.MdiParent = this;
            childForm.Show();
        }

        private void MainWindow_Load(object sender, EventArgs e)
        {

        }

        private void restoreFromBackupToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void restoreABackupToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form childForm = new frmRestoreBackup(); 
            childForm.MdiParent = this;
            childForm.Show();
        }

        private void performABackupToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form childForm = new FrmPerformabackup(); 
            childForm.MdiParent = this;
            childForm.Show();
        }
    }
}
